package algorithm.easy;

public class Solution27_2 {

    public static int removeElement(int[] nums, int val) {
       int slowindex = 0;
       for(int fastindex=0;fastindex<nums.length;fastindex++){
           if(nums[fastindex]!=val){
               nums[slowindex++]=nums[fastindex];
           }
       }
       return slowindex;
    }
}
